﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace yaTDL.Controls
{
    /// <summary>
    /// Interaction logic for ListHeaderControl.xaml
    /// </summary>
    public partial class ListHeaderControl : UserControl
    {
        public ListHeaderControl()
        {         

            InitializeComponent();

            this.textBlock.DataContext = this;
            this.button.DataContext = this;
        }


        public string Text
        {
            get { return (string)GetValue(TextProperty); }
            set { SetValue(TextProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Text.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TextProperty =
            DependencyProperty.Register("Text", typeof(string), typeof(ListHeaderControl));



        public string SortButtonText
        {
            get { return (string)GetValue(SortButtonTextProperty); }
            set { SetValue(SortButtonTextProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SortButtonText.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SortButtonTextProperty =
            DependencyProperty.Register("SortButtonText", typeof(string), typeof(ListHeaderControl));


        public ICommand SortButtonCommand
        {
            get { return (ICommand)GetValue(SortButtonCommandProperty); }
            set { SetValue(SortButtonCommandProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SortButtonCommand.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SortButtonCommandProperty =
            DependencyProperty.Register("SortButtonCommand", typeof(ICommand), typeof(ListHeaderControl));
        
    }
}
